package com.guigu.userservice.feign;

import com.guigu.userservice.dto.DetectionReport;
import com.guigu.userservice.dto.Equipment;
import com.guigu.userservice.vo.BusinessmanEquipmentVo;
import com.guigu.userservice.vo.UserCollectionEquipmentVoPC;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "service-equipment")
public interface myEquipmentFeign {

    //根据设备ID查询设备
    @GetMapping("/equipmentservice/equipment/selectEqById/{id}")
    Equipment selectEqById(@PathVariable("id") Long id);


    @GetMapping("equipmentservice/equipment/selectEqById2/{eid}/{isId}")
    Equipment selectEqById2(@PathVariable("eid") Long eid,@PathVariable("isId") Long isId) ;

    @PostMapping("equipmentservice/equipment/selectEq/{eid}")
    Equipment selectEq(@PathVariable("eid") Long eid,@RequestBody BusinessmanEquipmentVo vo) ;


        /**
         * 查询设备检测报告
         * @param id
         * @return
         */
    @GetMapping("/equipmentservice/detectionReport/queryDetectionReportByEquipmentId/{id}")
    DetectionReport queryDetectionReportByEquipmentId(@PathVariable("id") Long id);

    @GetMapping("/equipmentservice/equipment/selectEquipmentByIdFeign/{id}")
    Equipment selectEquipmentByIdFeign(@PathVariable("id") Long id);

    @PostMapping("/equipmentservice/equipment/editEquipmentByStatusLing/{BId}")
    List<Equipment> editEquipmentByStatusLing(@PathVariable("BId") Integer BId, @RequestBody BusinessmanEquipmentVo vo);
    @PostMapping("/equipmentservice/equipment/selectEquipmentAndImageAndType/{id}")
    Equipment selectEquipmentAndImageAndType(@PathVariable("id") Long id, @RequestBody UserCollectionEquipmentVoPC userCollectionEquipmentVoPC);

    @PostMapping("/equipmentservice/equipment/selectEquipmentAndImageAndType3/{id}")
    Equipment selectEquipmentAndImageAndType3(@PathVariable("id") Long id, @RequestBody UserCollectionEquipmentVoPC userCollectionEquipmentVoPC);

    @GetMapping("/equipmentservice/detectionReport/selectDetectionReportByEqIdAndAudit/{equipmentId}/{Audit}")
    DetectionReport selectDetectionReportByEqIdAndAudit(@PathVariable("equipmentId") Long equipmentId, @PathVariable("Audit") Integer audit);

    @PostMapping("/equipmentservice/equipment/selectEquipmentAndImageAndType2/{id}")
    Equipment selectEquipmentAndImageAndType2(@PathVariable("id") Long id);

}
